const getH = (matrix, labels, xxx, w) => {
  const len = matrix.length;
  let h_p = 0;
  let h_n = 0;
  for (let i = 0; i < len; i++) {
    for (let j = i + 1; j < len; j++) {
      if (labels[i] === labels[j] && matrix[i][j] === -1) {
        h_n++;
      } else if (labels[i] !== labels[j] && matrix[i][j] === 1) {
        h_p++;
      }
    }
  }
  return -(h_p + h_n);
};
export default getH;
